package com.jackeysun.app_util

import com.jackeysun.util.*
import java.util.*

fun main() {
    println(Date().format("E"))
    println("2021-11-20 10:07:24".toDate("yyyy-MM-dd HH:mm:ss"))

    val calendar = Calendar.getInstance()
    calendar.set(2026,0,27,15,2,59)
    println(calendar.time.format("E"))
    println("天数：${calendar.time.toDays()}")
    println("时数：${calendar.time.toHours()}")
    println("分数：${calendar.time.toMinutes()}")
    println("秒数：${calendar.time.toSeconds()}")

    println("年：${calendar.time.getYEAR()}")
    println("月：${calendar.time.getMONTH()}")
    println("日：${calendar.time.getDayOfMonth()}")
    println("时：${calendar.time.getHour()}")
    println("分：${calendar.time.getMinute()}")
    println("秒：${calendar.time.getSecond()}")

    println("一年中第几天：${calendar.time.getDayOfYear()}")
    println("一周中第几天：${calendar.time.getDayOfWeek()}")
    println("一月中第几周：${calendar.time.getWeekOfMonth()}")
}